package com.lzm.back.mapper;

import com.lzm.back.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {


    List<User> selectAll(User User, @Param("username") String username, @Param("role") String role);

    User selectByID(Integer id);

    void insertuser(User newUser);

    void updateUserById(User newUser);

    void deleteUserById(Integer id);

    List<User> selectByCondition(@Param("username") String username,
                                 @Param("role") String role);

    @Select("select * from `user`  where username = #{username}")
    User getName(String username);
}
